<extend name="Base/common"/>
<block name="body">
<body class="board-page2">
<div class="container">
<header class="page-head2" >
    <figure class="user-info">
        <if condition="$follow_list['headimgurl'] neq ''">
            <a href="javascript:void(0);" class="user-avatar"  style="display:inline-block;background-image:url({$follow_list['headimgurl']})" ></a>
            <else />
            <a href="javascript:void(0);" class="user-avatar"  style="display:inline-block;background-image:url('__IMG__/avatar.png')"></a>
        </if>
        <p class="user-name">{$follow_list.nickname}</p>
        <!--<p class="user-account">toqingzi@163.com</p>-->
        <p class="user-balance"><i></i>金豆余额 <b>{$follow_list['gold_bean']}</b></p>
    </figure>
    <table class="tab-table-widen">
        <tbody><tr>
            <td class="tab gross-income">
                <p class="value">{$myRank.bean}</p>
                <p class="label">总战绩</p>
            </td>
            <td class="tab ranking">
                <if condition="$myRank['rank']"><else/></if>

                <p class="value"> <if condition="$myRank['rank']">{$myRank.rank}<else/>暂无排名</if></p>
                <p class="label">总排名</p>

            </td>
        </tr>
        </tbody></table>

</header>

<section class="page-body volves">
    <div class="panel situation">
        <div class="panel-head">
            <h1 class="title"><i class="name">最新战况</i>
            </h1>
        </div>
        <div class="panel-body">
            <div class="income-status">
              <if condition="$total_record eq 0"><p class="bean-count up"><elseif  condition="$total_record gt 0" /><p class="bean-count up">+<else /><p class="bean-count down"></if>{$total_record}</p>
            </div>
            <div class="details history-info">
                <header class="details-header">
                    <h1 class="details-title">查看明细</h1>
                    <div class="summary">
                        <p class="bean-info has-record show"><!--show-->

                                <span class="bean-in">投入<span class="bean-in-count">{$total_gold_bean}</span>金豆</span>
                                <span class="bean-out">收益率 : <span class="bean-out-count">{$rate}%</span></span>

                        </p>

                       <!--<p class="bean-info no-record  <if condition='$total_end_list'>hide<else />show</if> ">&lt;!&ndash;show&ndash;&gt;
                           <span class="bean-in">您的竞猜结果即将揭晓，敬请期待</span>
                           <span class="bean-in" style="display: none">您的竞猜结果即将揭晓，敬请期待</span>&lt;!&ndash;另一种状态&ndash;&gt;
                        </p>-->
                    </div>
                </header>
                <div class="details-detail" style="display: none"><!--open-->
                    <div class="unbet" init-name="hasBetDetail-class">
                        <if condition="$end_list">
                            <else />
                            暂无记录
                        </if>
                    </div>
                    <ul>
                        <volist name="end_list" id="vo">
                        <li>
                            <span><time> {$vo.day} {$vo.hi}</time>
                                <if condition="$vo['type'] eq 1">
                                猜涨 <if condition="$vo['profit_gold_bean'] gt 0 ">(猜对)<else />(猜错)</if>
                                <else />
                                猜跌<if condition="$vo['profit_gold_bean'] gt 0">(猜对)<else />(猜错)</if>
                                </if>
                            </span>
                            <span class="align-right">金豆</span>
									<span class="plus-minus-bean success">
                                           <em class="result"></em><em class="count">{$vo.profit_gold_bean}</em>
									</span>
                        </li>
                            </volist>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="panel today-bet">
        <div class="panel-head">
            <div class="panel-title">
                <i class="name">正在下注</i>
            </div>
        </div>
        <div class="panel-body">
            <div class="unbet <if condition='$carried_out_list'>hide<else />show</if>"><!--show-->
                <p>您目前还没有下注，快来竞猜赢大奖吧！</p>
            </div>
            <ol class="bet-list">
                <if condition='$carried_out_list'>
                    <volist name="carried_out_list" id="vo">
                        <li>
                            <p>
                                <time class="bet-time">{$vo.day} {$vo.hi}</time>
                                <span>
                                    <if condition="$vo['type'] eq 1">
                                        <em  class="bet-option_my up">
                                            <else />
                                            <em class="bet-option_my down">
                                    </if>
                                        <if condition="$vo['type'] eq 1">看涨<else />看跌</if>
                                        </em>
                                </span>
                                <span class="board-odds">赔率:{$vo.odds}</span>
                                <span class="align-right">投入<em class="bean-count">{$vo.gold_bean}</em>金豆</span>
                            </p>
                        </li>
                    </volist>
                </if>

              <!--  <li>
                    <p>
                        <time class="bet-time">昨天 14:52</time>
                        <span><em class="bet-option up">看涨</em></span>
                        <span class="board-odds">赔率:2.11</span>
                        <span class="align-right">投入<em class="bean-count">100</em>金豆</span>
                    </p>
                </li>-->

            </ol>
        </div>
    </div>
    <div class="panel person-history">
    <div class="panel-head">
        <h1 class="panel-title">
            <i class="name">个人战绩图</i>
            <!--<time class="current-month" init-name="calendardate-html" id="calendar-date">{value}</time>  -->
        </h1>
    </div>
        <div class="databox clearfix" id="ops">
            <span class="dataclicks" style="display: none"></span>
        </div>
    </div>
</section>
</div>

<block name="script">
    <script type="text/javascript" src="__JS__/calendar.js"></script>
    <script type="text/javascript">
       	var data;//=[['2016-01','15','0'],['2015-12','11','0'],['2015-12','24','1']];
        $('#ops').dddata();
        $('#nowsn').css('color','#a9a9a9')
        function Callback(data_year,data_mouth,data_day){
//	console.log('Callback');
		//添加月份
            if(data_mouth==12){
                $('#nowsp').find('span').eq(1).html('11月');
                $('#nowsn').find('span').eq(0).html('1月');
            }else if(data_mouth==01){
                $('#nowsp').find('span').eq(1).html('12月');
                $('#nowsn').find('span').eq(0).html('2月');
            }else{
                $('#nowsp').find('span').eq(1).html((parseInt(data_mouth)-1)+'月');
                $('#nowsn').find('span').eq(0).html((parseInt(data_mouth)+1)+'月');
//                console.log((parseInt(data_mouth)+1)+'月');
            };
			//
            var dydy=data_year+"-"+data_mouth+"-"+"01";
            var cx=new Date(dydy).getDay();
            var xiaos=$('#datanows').html();
			//跳转
			var url="{:U('MyRecord/time_record_img')}";
	
			$.post(url,{data:xiaos},function(dataa){
				data = dataa;
				for(var i=0;i<data.length;i++){
                	if(xiaos==data[i][0]){
                    	if(data[i][2]==0){
                       		$('#calendarday').find('span').eq(parseInt(cx)+parseInt(data[i][1])-1).html("").addClass('yes');
			//				console.log(parseInt(cx)+'/'+parseInt(data[i][1]));
                    	}else{
                        	$('#calendarday').find('span').eq(parseInt(cx)+parseInt(data[i][1])-1).html("").addClass('no');
                    	}
                	}
            	}
			},'json')
        }
//        $('#nowsp').find('span').eq(0).css({'height':'24px','width':'18px','display':'inline-block'});
//        $('#nowsn').find('span').eq(1).html(' >');
    </script>
    <script type="text/javascript">
        $(function(){
            $('.details .details-title').click(function(){
                $('.details-detail').toggle();
            });
        });
    </script>
</block>

</body>

</block>